using System;
using System.Data;
namespace ServiceStack.Data
{
	public class DbConnectionFactory : IDbConnectionFactory
	{
		private readonly Func<IDbConnection> connectionFactoryFn;
		public DbConnectionFactory(Func<IDbConnection> connectionFactoryFn)
		{
			this.connectionFactoryFn = connectionFactoryFn;
		}
		public IDbConnection OpenDbConnection()
		{
			IDbConnection expr_06 = this.CreateDbConnection();
			expr_06.Open();
			return expr_06;
		}
		public IDbConnection CreateDbConnection()
		{
			return this.connectionFactoryFn();
		}
	}
}
